<!--
  @author chongw
  @since 2021-05-28 17:05:29
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<table class="layui-table dept-table">
    <thead>
    <tr>
        <th style="text-align: center;">部门ID</th>
        <th style="text-align: center;">部门名称</th>
        <th style="text-align: center;">一级预警</th>
        <th style="text-align: center;">二级预警</th>
        <th style="text-align: center;">三级预警</th>
        <th style="text-align: center;">状态</th>
        <th style="text-align: center;">操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="item:${deptItems}">
        <td th:text="${item.deptId}"></td>
        <td th:text="${item.ruleName}"></td>
        <td th:text="${item.rule1.expression + item.rule1.value +'%'}"></td>
        <td th:text="${item.rule2.expression + item.rule2.value +'%'}"></td>
        <td th:text="${item.rule3.expression + item.rule3.value +'%'}"></td>
        <td th:text="${T(com.zmn.plat.common.dictionary.StatusEnum).getName(item.status)}"></td>
        <td>
            <a href="javascript:void(0)" th:onclick="|ruleInfo(${item.ruleId})|" lay-text="配置规则" style="color: #00a0e9">配置规则</a>
            <a href="javascript:void(0)" th:ruleId="${item.ruleId}" th:event="${item.status == 1?'start':'stop'}" class="modifyDeptStatus" style="color: #00a0e9" th:text="${item.status == 1?'启用':'停用'}" ></a>
        </td>
    </tr>
    </tbody>
</table>